-- GENERATED SPELL FOR [Prince Xavalis] --


function spell0_9877(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(11962,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9877', 17000, 1)
end

function spell1_9877(pUnit, Event) --@Jadefire,Self--
pUnit:FullCastSpellOnTarget(13578,pUnit)
pUnit:RegisterEvent('Sorts_9877', 8320, 1)
end

function Sorts_9877(pUnit, Event)
local choix_sorts_9877 = math.random(0, 1)
if choix_sorts_9877 == 0 then
pUnit:RegisterEvent('spell0_9877', 1, 1)
end
if choix_sorts_9877 == 1 then
pUnit:RegisterEvent('spell1_9877', 1, 1)
end
end

function mob9877_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9877', math.random(1500, 3000), 1)
end

function mob9877_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9877_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9877_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9877, 1, 'mob9877_Action')
RegisterUnitEvent(9877, 2, 'mob9877_Leave')
RegisterUnitEvent(9877, 3, 'mob9877_Kill')
RegisterUnitEvent(9877, 4, 'mob9877_Die')
